<?php
error_reporting(E_ALL);

define('DIR_ROOT', substr(dirname(__FILE__), 0, -5).'/');
require_once(DIR_ROOT . '/core/config.inc.php');

//自动加载类
function __autoload ($class_name) {
	if(!class_exists($class_name, false)) {
		$class_name = strtolower($class_name);

		$offset = strpos($class_name, '_');
		$dirname = substr($class_name , 0, strpos($class_name, '_'));
		$filename = substr($class_name , $offset+1) . '.php';

		include DIR_ROOT . 'core/' . $dirname . '/' . $filename;
	}
}

//mb_internal_encoding('utf-8');
